<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ include file="/jsp/common/common.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link href="<c:url value="/static/fullcalendar/fullcalendar.css"/>"
    rel='stylesheet' />
<link
    href="<c:url value="/static/fullcalendar/fullcalendar.print.css"/>"
    rel='stylesheet' media='print' />
<link rel="stylesheet" type="text/css"
    href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
    href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
<link rel="Stylesheet" type="text/css"
    href="<c:url value="/static/css/jquery.ui.css"/>" />
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/common.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/LodopFuncs.js"/>"></script>
<script type="text/javascript"
    src="<c:url value="/static/js/Loading.js"/>"></script>
<script type="text/javascript"
    src="<c:url value="/static/js/showMsg.js"/>"></script>
<script type="text/javascript"
    src="<c:url value="/static/listBox/jquery.clever.listbox.js"/>"></script>
<script>
	function initList(listDisplayEId) {
		$('#' + listDisplayEId)
				.datagrid(
						{
							nowrap : false,
							striped : true,
							collapsible : true,
							remoteSort : true,
							notSelectByRow : false,
							/* frozenColumns : [ [ {
								field : 'ids',
								checkbox : true
							} ] ], */
							toolbar : [
									{
										id : listDisplayEId + '_btn_add',
										text : '新增',
										iconCls : 'icon-add',
										handler : function() {
											var new_win = window.open("<c:url value='/jsp/openIndexSun.jsp?url=/mater/preSaveMaterForSupplier.do'/>","sun","width=1200px,height=600px,status=no,scrollbars=yes");
											new_win.focus();
											$('#' + listDisplayEId).datagrid('reload');
										}
									},
									'-',
									{   id : listDisplayEId + '_btn_edit',
										text : '修改',
										iconCls : 'icon-edit',
										handler : function() {
											var row = $('#' + listDisplayEId).datagrid('getSelections');
											if (row.length == 0) {
												$.messager.alert('提示','请选择一条记录操作！', 'info');
												return;
											} else {
												var new_win = window
														.open("<c:url value='/jsp/openIndexSun.jsp?url=/mater/preUpdateMater.do'/>"
																+ "?materId="
																+ row[0]['materId']
																+ "&materLevel="
																+ row[0]['materLevel']
																+ "&supId="
																+ row[0]['supId'],
																"sun","width=1200px,height=600px,status=no,scrollbars=yes");
												new_win.focus();
												$('#' + listDisplayEId).datagrid('reload');
											}
											$('#' + listDisplayEId).datagrid('clearSelections');
										}
									},
									{
										id : listDisplayEId + '_btn_del',
										text : '删除',
										iconCls : 'icon-cancel',
										handler : function() {
											var row = $('#' + listDisplayEId).datagrid('getSelections');
											if (row.length == 0) {
												$.messager.alert('提示','请选择一条记录操作！', 'info');
												return;
											} else {
												var str = "materId="
														+ row[0]['materId']
														+ "&materLevel="
														+ row[0]['materLevel']
														+ "&supId="
														+ row[0]['supId'];
												$.messager.confirm('提示','是否删除该条记录？',
																function(r) {
																	if (r) {
																		$.ajax({
																					type : 'post',
																					url : "<c:url value='/mater/deleteMater.do'/>",
																					data : str,
																					dataType : "json",//设置查询参数及提交路径
																					success : function(data) {
																						if (data.success) {
																							$.messager.alert("提示","删除成功！",'info');
																							$('#'+ listDisplayEId).datagrid('reload');
																						} else {
																							$.messager.alert("提示",data.msg,'warning');
																						}
																					},
																					error : function() {
																						$.messager.alert("错误","系统错误，请联系管理员！",'error');
																					}
																				});
																	}
																	$('#'+ listDisplayEId).datagrid('reload');
																	$('#'+ listDisplayEId).datagrid('clearSelections');
																});
											}
										}
									},
									{
										id : listDisplayEId + '_btn_del',
										text : '恢复',
										iconCls : 'icon-edit',
										handler : function() {

											var row = $('#' + listDisplayEId).datagrid('getSelections');
											if (row.length == 0) {
												$.messager.alert('提示','请选择一条记录操作！', 'info');
												return;
											} else {
												var str = "materId="
														+ row[0]['materId']
														+ "&materLevel="
														+ row[0]['materLevel']
														+ "&supId="
														+ row[0]['supId'];
												$.messager.confirm('提示','是否恢复该条记录？',
																function(r) {
																	if (r) {
																		$.ajax({
																					type : 'post',
																					url : "<c:url value='/mater/recoverMater.do'/>",
																					data : str,
																					dataType : "json",//设置查询参数及提交路径
																					success : function(	data) {
																						if (data.success) {
																							$.messager.alert("提示","恢复成功！",'info');
																							$('#'+ listDisplayEId).datagrid('reload');
																						} else {
																							$.messager.alert("提示",data.msg,'warning');
																						}
																					},
																					error : function() {
																						$.messager.alert("错误","系统错误，请联系管理员！",'error');
																					}
																				});
																	}
																	$('#'+ listDisplayEId).datagrid('reload');
																	$('#'+ listDisplayEId).datagrid('clearSelections');
																});
											}
										}
									},
									{
										id : listDisplayEId + '_btn_save',
										text : '所有材料转换拼音',
										iconCls : 'icon-save',
										handler : function() {
											$.messager.confirm('提示','是否所有材料转换拼音？',
															function(r) {
																if (r) {
																	$.ajax({
																				type : 'post',
																				url : "<c:url value='/mater/converterSpell.do'/>",
																				data : {},
																				dataType : "json",//设置查询参数及提交路径
																				success : function(data) {
																					if (data.success) {
																						$.messager.alert("提示","处理成功！",'info');
																						$('#'+ listDisplayEId).datagrid('reload');
																					} else {
																						$.messager.alert("提示",data.msg,'warning');
																					}
																				},
																				error : function() {
																					$.messager.alert("错误","系统错误，请联系管理员！",'error');
																				}
																			});
																}
																$('#'+ listDisplayEId).datagrid('reload');
																$('#'+ listDisplayEId).datagrid('clearSelections');
															});
										}
									},
									{
										id : listDisplayEId + '_btn_edit',
										text : '材料图片',
										iconCls : 'icon-edit',
										handler : function() {

											var row = $('#' + listDisplayEId).datagrid('getSelections');
											if (row.length == 0) {
												$.messager.alert('提示','请选择一条记录操作！', 'info');
												return;
											} else {
												var new_win = window.open(
																"<c:url value='/jsp/openIndexSun.jsp?url=/photo/preMaterPhoto.do'/>"
																		+ "?materId="
																		+ row[0]['materId'],
																"sun",
																"width=1200px,height=600px,status=no,scrollbars=yes");
												new_win.focus();
												$('#' + listDisplayEId).datagrid('reload');
											}
											$('#' + listDisplayEId).datagrid('clearSelections');
										}
									},
									{
										id : listDisplayEId + '_btn_save',
										text : '导入限制金额',
										iconCls : 'icon-save',
										handler : function() {
											addCheckMaterCost();
										}
									},
									{
										id : listDisplayEId + '_btn_del',
										text : '单个材料绑定供应商',
										iconCls : 'icon-save',
										handler : function() {
											if(document.getElementById('supId').value ==0||document.getElementById('supId').value==''){
		                                        alert("请选择供货商");
		                                        return;
		                                    }
											
											var row = $('#' + listDisplayEId).datagrid('getSelections');
											if (row.length == 0) {
												$.messager.alert('提示','请选择一条记录操作！', 'info');
												return;
											} else {
												var str = "materId="
														+ row[0]['materId']
														+ "&supId="
														+ document.getElementById('supId').value
														+ "&distributorId="
														+ row[0]['supId'];
												$.messager.confirm('提示','是否绑定？',
																function(r) {
																	if (r) {
																		$.ajax({
																					type : 'post',
																					url : "<c:url value='/materSup/bindingMaterSupOne.do'/>",
																					data : str,
																					dataType : "json",//设置查询参数及提交路径
																					success : function(
																							data) {
																						if (data.success) {
																							$.messager.alert("提示","绑定成功！",'info');
																							$('#'+ listDisplayEId).datagrid('reload');
																						} else {
																							$.messager.alert("提示",data.msg,'warning');
																						}
																					},
																					error : function() {
																						$.messager.alert("错误","系统错误，请联系管理员！",'error');
																					}
																				});
																	}
																	$('#'+ listDisplayEId).datagrid('reload');
																	$('#'+ listDisplayEId).datagrid('clearSelections');
																});
											}
										}
									},
                                    {
                                        id : listDisplayEId + '_btn_del',
                                        text : '按照材料种类绑定供应商',
                                        iconCls : 'icon-save',
                                        handler : function() {
                                        	if ($('#materType').combobox('getValue') == '') {
                                                alert("请选择材料种类！")
                                                return;
                                            } 
                                            if(document.getElementById('supId').value ==0||document.getElementById('supId').value==''){
                                                alert("请选择供货商");
                                                return;
                                            }
                                            var str = "materType="
                                                + $('#materType').combobox('getValue')
                                                + "&supId="
                                                + document.getElementById('supId').value;
                                            $.ajax({
                                                type : 'post',
                                                url : "<c:url value='/materSup/bindingMaterSupBatch.do'/>",
                                                data : str,
                                                dataType : "json",//设置查询参数及提交路径
                                                success : function(
                                                        data) {
                                                    if (data.success) {
                                                        $.messager.alert("提示","绑定成功！",'info');
                                                        $('#'+ listDisplayEId).datagrid('reload');
                                                    } else {
                                                        $.messager.alert("提示",data.msg,'warning');
                                                    }
                                                },
                                                error : function() {
                                                    $.messager.alert("错误","系统错误，请联系管理员！",'error');
                                                }
                                            });
                                            
                                            
                                        }
                                    } ],
							onLoadError : function() {
								$.messager.alert('错误', '获取数据失败，请与管理员联系！','error');
							},
							onClickRow : function(rowIndex) {
								$('#listDisplay').datagrid('beginEdit',rowIndex);
								$(".myrad").prop("checked", false);
								$(".myrad").eq(rowIndex).prop("checked", true);
							}
						});
	};
	$(document).ready(function() {
		document.getElementById('zzy').style.display = 'none';
        document.getElementById('supId').value = '';
		initList('listDisplay');
	});

	//品级格式
	function formatMaterLevel(value, row, index, field) {
		if (value == "1") {
			return "优";
		} else if (value == "2") {
			return "中";
		} else if (value == "3") {
			return "差";
		}
	}

	function formatRadio(value, rowData, rowIndex) {
		return value = "<input type='radio' class='myrad'  name='radioMater' />";
	}

	function excelIn() {

		$('#excelForm').form('submit', {
			url : '<c:url value='/store/importBrandSort.do'/>', //查询提交路径
			onSubmit : function()//提交按钮相应函数
			{
				return $('#excelForm').form('validate');
			},
			success : function(data) {
				data = eval("(" + data + ")");
				if (data.success) {
					$.messager.alert("提示", "上传成功！", 'info');
				} else {
					var message = "";
					if (data.msg == "msg007") {
						message = "excel 格式有问题 请检查。";
					}
					if (data.msg == "msg006") {
						message = "请检查供货商名称是否正确。";
					}
					$.messager.alert("提示", message, 'warning');
				}
			},
			error : function() {
				$.messager.alert("错误", "系统错误，请联系管理员！", 'error');
				return;
			}
		});

	}
	function excel() {
		$('#excelForm').form('submit', {
			url : '<c:url value='/mater/exportMaterExcel.do'/>', //查询提交路径
			onSubmit : function()//提交按钮相应函数
			{
				return $('#excelForm').form('validate');
			},
			success : function(data) {
				data = eval("(" + data + ")");
				if (data.success) {
					$.messager.alert("提示", "提交成功！", 'info', function() {
						window.close();
					});
				} else {
					$.messager.alert("提示", data.msg, 'warning');
				}
			},
			error : function() {
				$.messager.alert("错误", "系统错误，请联系管理员！", 'error');
				return;
			}
		});
	}

	//下拉框
	$(function() {
		$('#materType').combobox({
			url : "<c:url value='/mater/pulldownMaterType.do?space=1'/>",
			editable : true, //不可编辑状态  
			cache : false,
			panelHeight : '150',
			valueField : 'materType',
			textField : 'materTypename',
		});
		$("#supName").textbox({
			buttonText : '选择',
			iconCls : 'icon-man',
			iconAlign : 'left',
			editable : false,
			value : "无",
			onClickButton : function() {

				initDateLeft();
				showMsgLeft();
				ShowDiv();

				var left = $('#left').listbox();
				var items = left.getDatas();
				left.removeRange(items);

				var right = $('#right').listbox();
				var itemsr = right.getDatas();
				right.removeRange(itemsr);

				$('#left').listbox().reload({
					data : dataLeft,
					ajaxsettings : {
						data : {
							id : 'a'
						}
					}
				});
			}
		});
	});
	function searchInfo() {
		if ($('#materType').combobox('getValue') == '') {
			$('#listDisplay').datagrid('load', {
				materType : 0,
				materName : $('#materName').val()
			});
		} else {
			$('#listDisplay').datagrid('load', {
				materType : $('#materType').combobox('getValue'),
				materName : $('#materName').val()
			});
		}
	}
	function tea() {
		$('#listDisplay').datagrid('load');
	}

	// 颜色
	function cellStyler(value, row, index) {
		if (row['deleteFlag'] == 1) {
			return 'background-color:red;';
		}
	}
	function addCheckMaterCost() {
		var row = $('#listDisplay').datagrid('getSelections');

		if (row.length == 0) {
			$.messager.alert('提示', '请选择一条记录操作！', 'info');
			return;
		} else {

			var rowIndex = $('#listDisplay').datagrid('getRowIndex',
					row[0]['materId']);
			$('#listDisplay').datagrid('endEdit', rowIndex);
			var checkCostId = row[0]['checkCostId'];
			var materId = row[0]['materId'];
			var lowLimit = row[0]['lowLimit'];
			var upperLimit = row[0]['upperLimit'];
			if (lowLimit == '') {
				lowLimit = 0;
			}
			if (upperLimit == '') {
				upperLimit = 0;
			}

			var checkSaleId = row[0]['checkSaleId'];
			var lowLimitSale = row[0]['lowLimitSale'];
			var upperLimitSale = row[0]['upperLimitSale'];
			if (lowLimitSale == '') {
				lowLimitSale = 0;
			}
			if (upperLimitSale == '') {
				upperLimitSale = 0;
			}

			$.ajax({
				async : false,
				url : "<c:url value='/materSup/addCheckMaterValue.do'/>"
						+ "?materId=" + materId + "&lowLimit=" + lowLimit
						+ "&upperLimit=" + upperLimit + "&checkCostId="
						+ checkCostId + "&lowLimitSale=" + lowLimitSale
						+ "&upperLimitSale=" + upperLimitSale + "&checkSaleId="
						+ checkSaleId,
				type : "post",
				success : function(data) {
					if (typeof (data) == 'string') {
						data = JSON.parse(data);
					}

					if (data.success) {
						$.messager.alert("提示", "提交成功！", 'info', function() {
							searchInfo();
						});
					} else {
						$.messager.alert("提示", data.msg, 'warning');
					}
				}
			});
		}
	}
	var dataLeft;
	function initDateLeft() {
		$.ajax({
			async : false,
			url : "<c:url value='/supplier/getAllSup.do'/>",
			type : "post",
			success : function(data) {
				dataLeft = data;
				if (typeof (dataLeft) == 'string' && dataLeft != '') {
					dataLeft = JSON.parse(dataLeft);
				}
			}
		});
	}
	function ShowDiv() {
		var Allwidth = '100%';
		var Allheight = '100%';
		document.getElementById('zzy').style.display = '';
		Loading.Show({
			width : Allwidth,
			height : Allheight
		});
	}
	//初始化showMsg
	function showMsgLeft() {
		$('#left').listbox({
			data : dataLeft,
			height : 300,
			width : 200,
			dndscope : 'demo',
			dnd : false,
			multiselect : true,
			selectchange : function(data) {
				if (data && data.length > 0) {
					$('#btnRight').attr('disabled', false);
				} else {
					$('#btnRight').attr('disabled', true);
				}
			}
		});
		$('#right').listbox({
			//data: data,
			height : 300,
			width : 200,
			dndscope : 'demo',
			dnd : true,
			multiselect : true
		});
		$('#btnRightAll').click(function() {
			var left = $('#left').listbox();
			var items = left.getDatas();
			left.clear();
			$('#right').listbox().addRange(items);
		});
		$('#btnLeftAll').click(function() {
			var right = $('#right').listbox();
			var items = right.getDatas();
			right.clear();
			$('#left').listbox().addRange(items);
		});
		$('#btnRight').click(function() {
			var left = $('#left').listbox();
			var items = left.getSelected();
			left.removeRange(items);
			$('#right').listbox().addRange(items);
		});
		$('#btnLeft').click(function() {
			var right = $('#right').listbox();
			var items = right.getSelected();
			right.removeRange(items);
			$('#left').listbox().addRange(items);
		});
		$('#btnRemove').click(function() {
			$('#right').listbox().removeRange([ {
				value : 2
			}, {
				value : 26
			} ]);
		});
		$('#btnSelect').click(function() {
			var selected = $('#right').listbox().getSelected();
			var msg = 'Selected count is: ' + selected.length;
			if (selected.length > 0) {
				msg += ', The first item text is: ' + selected[0].text;
			}
			msg += '.';
			alert(msg);
		});
		$('#btnGetItems').click(function() {
			var selected = $('#right').listbox('getDatas');
			alert('Items count is: ' + selected.length);
		});
		$('#btnSetSelection').click(function() {
			$('#left').listbox('setSelection', 1);
		});
		$('#select').click(function() {
			Loading.Hide();
			document.getElementById('zzy').style.display = 'none';

			var right = $('#right').listbox();
			var items = right.getDatas();
			var userNames = '';
			var userIds = '';
			if (items.length == 1) {
				for ( var e in items) {
					userNames = userNames + items[e].text + ',';
					userIds = userIds + items[e].value + ',';
				}
				userNames = userNames.substring(0, userNames.length - 1);
				userIds = userIds.substring(0, userIds.length - 1);

				if (userNames != '' && userIds != '') {
					$('#supName').textbox('setValue', userNames);
					document.getElementById('supId').value = userIds;
				} else {
					$('#supName').textbox('setValue', '无');
					document.getElementById('supId').value = '';
				}
			} else {
				alert("供货商请选择一家！");
			}

		});
		$('#noselect').click(function() {
			Loading.Hide();
			document.getElementById('zzy').style.display = 'none';
		});
	}
</script>
</head>
<body>

	<object id="LODOP_OB"
		classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
		<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
	</object>

	<table width="98%">
		<tr>
			<td>
				<div
					style="height: auto; width: 1180px; background: #fafafa; padding: 5px;"
					class="easyui-panel" title="批量修改" iconCls="icon-add"
					collapsible="true" minimizable="false" maximizable="false"
					closable="false">
					<form id="excelForm" name="excelForm" method="post"
						enctype="multipart/form-data" action="userlist.txt"
						onsubmit="return searchDGData(this.id,'listDisplay');">
						<div>
							<table cellpadding="5">
								<tr>

									<td>文件路径</td>
									<td><input class="easyui-filebox" name="filename"></input></td>
									<td><input type="button" onclick="excelIn()"
										value="批量修改原材料"></td>
								</tr>
							</table>
						</div>
					</form>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				<div
					style="height: auto; width: 1180px; background: #fafafa; padding: 5px;"
					class="easyui-panel" title="查询" iconCls="icon-search"
					collapsible="true" minimizable="false" maximizable="false"
					closable="false">
					<form id="searchForm" name="searchForm" method="post"
						action="userlist.txt"
						onsubmit="return searchDGData(this.id,'listDisplay');">
						<div>
							<table cellpadding="5">
								<tr>
									<td>材料名：</td>
									<td><input class="easyui-validatebox" id="materName"
										editable="true" name="materName"></input></td>
									<td>类别：</td>
									<td><input class="easyui-combobox" id="materType"
										editable="false" name="materType"></input></td>
									<td><input type="button" onclick="searchInfo()" value="查询"></td>
									<td>供货商</td>
									<td><input name="supName" id="supName" editable="false"
										data-options="required:true" /></td>
									<td><input class="easyui-validatebox" type="hidden"
										name="supId" id="supId" editable="false" /></td>
								</tr>
							</table>
						</div>
					</form>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				<table id="listDisplay" title="材料列表" iconCls="icon-list"
					singleSelect="true" idField="materId"
					url="<c:url value="/materSup/findMater.do"/>" loadMsg="请稍候......"
					pagination="true" pageSize="20" pageList="[10,20,30,40,50]"
					sortName="materId" rownumbers="true" sortOrder="asc">
					<thead>
						<tr>
							<th field="materRole" width="25" align="center"
								formatter="formatRadio" styler="cellStyler"></th>
							<th field="materId" width="80" formatter="formatDGField"
								sortable="true" styler="cellStyler">材料ID</th>
							<th field="materName" width="80" formatter="formatDGField"
								sortable="true" styler="cellStyler">材料名</th>
							<th field="unit" width="50" sortable="true" styler="cellStyler">单位
							</th>
							<th field="brands" width="70" sortable="true" styler="cellStyler">品牌
							</th>
							<th field="specifications" width="70" sortable="true"
								styler="cellStyler">规格</th>
							<th field="materType" width="80" formatter="formatFoodType1"
								sortable="true" styler="cellStyler">种类</th>
							<th field="materLevel" width="50" formatter="formatMaterLevel"
								sortable="true" hidden="true" styler="cellStyler">品别</th>
							<th field="supId" width="80" sortable="true" hidden="true"
								styler="cellStyler">供货商ID</th>
							<th field="supName" width="100" sortable="true"
								styler="cellStyler" hidden="true">供货商名</th>
							<th field="supSupName" width="100" sortable="true"
								styler="cellStyler">材料绑定供货商</th>
							<th field="materValue" width="60" sortable="true"
								styler="cellStyler" hidden="true">净料价格</th>
							<th field="materValueUndressed" width="60" sortable="true"
								styler="cellStyler" hidden="true">毛料价格</th>
							<th field="materProportion" width="60" formatter="formatDGField"
								sortable="true" styler="cellStyler" hidden="true">毛料率</th>
							<th field="materDescribe" width="100" formatter="formatDGField"
								sortable="true" styler="cellStyler">描述</th>
							<th field="deleteFlag" width="60" sortable="true"
								formatter="formateDeleteFlag" styler="cellStyler">删除标记</th>
							<th field="checkCostId" width="80" sortable="true"
								styler="cellStyler" hidden='true'>costId</th>
							<th field="lowLimit" width="80" sortable="true"
								styler="cellStyler" editor="text">进货价格下限</th>
							<th field="upperLimit" width="80" sortable="true"
								styler="cellStyler" editor="text">进货价格上限</th>
							<th field="lowLimitSale" width="80" sortable="true"
								styler="cellStyler" editor="text">销售价格下限</th>
							<th field="upperLimitSale" width="80" sortable="true"
								styler="cellStyler" editor="text">销售价格上限</th>


						</tr>
					</thead>
				</table>
			</td>
		</tr>
	</table>
	 <div style='position: absolute; left: 40px; top: 40px; z-index: 101; background-color: #FFFFFF; border-radius: 10px; width: 550px;'
        id="zzy">
        <table align="center">
            <tr>
                <td colspan="3">
                    <form id="searchFormForShowCust" name="searchFormForShowCust"
                        method="post" accept-charset="UTF-8">
                        <div
                            style="height: auto; width: 470px; background: #fafafa; padding: 5px;"
                            class="easyui-panel" title="查询" iconCls="icon-search"
                            collapsible="true" minimizable="false" maximizable="false"
                            closable="false">
                            <table>
                                <tr>
                                    <td>供货种类:</td>
                                    <td><input class="easyui-combobox" name="supMaterType"
                                        id="supMaterType" required="true" /></td>
                                    <td colspan="2"><a href="#" class="easyui-linkbutton"
                                        data-options="iconCls:'icon-search'" style="width: 60px"
                                        onclick="searchSupByMaterType()">查询</a></td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </td>
            </tr>
            <tr>
                <td>
                    <ul id="left">
                    </ul>
                </td>
                <td><input type="button" value="&gt;&gt;" id="btnRightAll"
                    style="width: 50px;" /><br /> <input type="button" value="&gt;"
                    id="btnRight" style="width: 50px;" /><br /> <input type="button"
                    value="&lt;" id="btnLeft" style="width: 50px;" /><br /> <input
                    type="button" value="&lt;&lt;" id="btnLeftAll" style="width: 50px;" />
                </td>
                <td>
                    <ul id="right">
                    </ul>
                </td>
            </tr>
        </table>
        <table align="center">
            <tr>
                <!--  
                <td><input type="button" value="Add Item" id="btnAdd" /></td>
                <td><input type="button" value="Remove Item" id="btnRemove" /></td>
                <td><input type="button" value="Get Select" id="btnSelect" /></td>
                <td><input type="button" value="Get Items" id="btnGetItems" /></td>
                <td><input type="button" value="SetSelection (value equal to '1')" id="btnSetSelection" /></td>
                <td><input type="button" value="Reload" id="btnReload" /></td>
                -->
                <td><input type="button" value="取消" id="noselect" /></td>
                <td width="200px"></td>
                <td><input type="button" value="选择" id="select" /></td>

            </tr>
        </table>
    </div>
</body>
</html>